/** An interface for a graph-crawling class. This is useful for drawing a graph,
    because when it traverses into links, it gives the traverser a reference to the
    node it came from. This is key for doing things such as drawing the graph.
    This class need ONLY be sent to a physical graph object; the graph will AUTOMATICALLY
    pass it to each of its nodes, which will in turn give it to each of its links. This
    effectively means that the user need ONLY PASS THIS OBJECT TO A GRAPH in order to visit
    EVERY node and link on that graph.
    @author Ian Helmke, Dan King
    @param KT The type of key used in the graph that this traverser crawls.
    @param NI The type of node used in the graph that this traverser crawls.
    @param LI The type of link used in the graph that this traverser crawls.
*/
public interface IGraphTraverser<KT, NI, LI> {
  /** Accepts a graph object.
      @param graph The graph currently being visited.
  */
  public void acceptGraph(Graph<KT, NI, LI> graph);

  /** Accepts a node object.
      @param node The node currently being visited.
  */
  public void acceptNode(INode<NI, LI> node);

  /** Accepts a link object. It also contains the originating
      node because links only contain infromation about the
      destination node. This allows the GraphTraverser to
      perform actions that depend on both the origin and
      destination nodes of the link (for example, if one wanted
      to physically draw the link, they would need to know both
      where it originated and what its destination was.
      @param link The link currently being visited.
      @param origin The node that this link originated from.
  */
  public void acceptLink(ILink<LI, NI> link, INode<NI, LI> origin);
}